/*
 * @Files:
 * @Version: 1.0
 * @Author: wanglu
 * @Date: 2020-03-26 09:50:14
 * @LastEditors: wanglu
 * @LastEditTime: 2020-04-15 16:44:06
 */
import request from '@/utils/request'
/**首页 */
var homeService = {
	/**
	 * @description: 查询出所有主题
	 * @param {type}
	 * @return:
	 */
	getAllSubjects() {
		return request({
			url: '/DoorManagement/subject/getSubjectContentNum',
			method: 'get',
			params: {}
		})
	},

	/**
	 * @description: 查询出所有部门
	 * @param {type}
	 * @return:
	 */
	getAllOrgs() {
		return request({
			url: '/DoorManagement/organization/getAllOrgs',
			method: 'get',
			params: {}
		})
	},
	/**
	 * @description: 查询出所有专题
	 * @param {type}
	 * @return:
	 */
	getAllSpecialTopics() {
		return request({
			url: '/DoorManagement/specialTopic/getAllSpecialTopics',
			method: 'get',
			data: {}
		})
	},
	// 疫情防控
	/**
	 * @description: 根据专题id查询目录
	 * @param {type}
	 * @return:
	 */
	getContentsBySpecialId(param) {
		return request({
			url: '/DoorManagement/contents/getContentsBySpecialId',
			method: 'post',
			params: param
		})
	},

	// 最新数据
	/**
	 * @description: 最新上线目录
	 * @param {type}
	 * @return:
	 */
	getMaxNewContents() {
		return request({
			url: '/DoorManagement/contents/getMaxNewContents',
			method: 'get',
			data: {}
		})
	},
	/**
	 * @description: 最新上线接口
	 * @param {type}
	 * @return:
	 */

	getMaxNewTasks() {
		return request({
			url: '/DoorManagement/task/getMaxNewTasks',
			method: 'get',
			data: {}
		})
	},

	// 热门数据
	/**
	 * @description: 目录下载排名
	 * @param {type}
	 * @return:
	 */

	getDownNumOrder() {
		return request({
			url: '/DoorManagement/contents/getDownNumOrder',
			method: 'get',
			data: {}
		})
	},
	/**
	 * @description: 接口调用排名
	 * @param {type}
	 * @return:
	 */ getcallTasksNum() {
		return request({
			url: '/DoorManagement/task/getcallTasksNum',
			method: 'get',
			data: {}
		})
	},

	//推荐数据

	/**
	 * @description: 获取推荐数据专题
	 * @param {type}
	 * @return:
	 */
	getRecommendedData(param) {
		return request({
			url: '/DoorManagement/contents/getRecommendedData',
			method: 'post',
			params: param
		})
	}
}
export { homeService }
